home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / devel / prolog / diffs / diff_1_8.1 < prev    next >
Encoding:
Text File  |  1993-09-17  |  12.0 KB  |  462 lines

  1. diff -c -r +new-file pl/STAMP pl/STAMP
  2. *** pl/STAMP    Mon Sep 13 11:54:15 1993
  3. --- pl/STAMP    Fri Sep 17 10:22:32 1993
  4. ***************
  5. *** 1 ****
  6. ! Mon Sep 13 11:52:55 MET DST 1993
  7. --- 1 ----
  8. ! Fri Sep 17 10:21:25 MET DST 1993
  9. diff -c -r +new-file pl/VERSION pl/VERSION
  10. *** pl/VERSION    Mon Sep  6 17:40:37 1993
  11. --- pl/VERSION    Fri Sep 17 10:06:37 1993
  12. ***************
  13. *** 1 ****
  14. ! 1.8.0
  15. --- 1 ----
  16. ! 1.8.1
  17. diff -c -r +new-file pl/boot/init.pl pl/boot/init.pl
  18. *** pl/boot/init.pl    Wed Feb 17 13:45:48 1993
  19. --- pl/boot/init.pl    Fri Sep 17 10:07:52 1993
  20. ***************
  21. *** 1,4 ****
  22. ! /*  init.pl,v 1.7 1993/02/17 12:45:48 jan Exp
  23.   
  24.       Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  25.       jan@swi.psy.uva.nl
  26. --- 1,4 ----
  27. ! /*  init.pl,v 1.8 1993/09/17 08:07:52 jan Exp
  28.   
  29.       Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  30.       jan@swi.psy.uva.nl
  31. ***************
  32. *** 390,402 ****
  33.       absolute_file_name(PlFile, FullName),
  34.       exists_file(FullName), !.
  35.   
  36.   $chk_lib_file(File, FullFile, Prefixes, Exts) :-
  37.       user:library_directory(Dir),
  38.       member(Prefix, Prefixes),
  39.       member(Ext, Exts),
  40.       concat_atom([Dir, '/', Prefix, '/', File, Ext], LibFile),
  41.       absolute_file_name(LibFile, FullFile),
  42. !     exists_file(FullFile), !.
  43.       
  44.   
  45.           /********************************
  46. --- 390,410 ----
  47.       absolute_file_name(PlFile, FullName),
  48.       exists_file(FullName), !.
  49.   
  50. + :- dynamic
  51. +     $lib_file_cache/4.
  52. + $chk_lib_file(File, FullFile, Prefixes, Exts) :-
  53. +     $lib_file_cache(File, FullFile, Pref, Ext),
  54. +     memberchk(Pref, Prefixes),
  55. +     memberchk(Ext, Exts), !.
  56.   $chk_lib_file(File, FullFile, Prefixes, Exts) :-
  57.       user:library_directory(Dir),
  58.       member(Prefix, Prefixes),
  59.       member(Ext, Exts),
  60.       concat_atom([Dir, '/', Prefix, '/', File, Ext], LibFile),
  61. +     exists_file(LibFile), !,
  62.       absolute_file_name(LibFile, FullFile),
  63. !     asserta($lib_file_cache(File, FullFile, Prefix, Ext)).
  64.       
  65.   
  66.           /********************************
  67. ***************
  68. *** 668,689 ****
  69.           $consult_clause(Clause, File), !.
  70.   
  71.   :- dynamic
  72. !     $module_file/3.
  73. ! $module_file(File, Module) :-
  74. !     $module_file(File, _Base, Module), !.
  75. ! $module_file(File, Module) :-
  76. !     $file_base_name(File, Base),
  77. !     $module_file(LoadedFile, Base, Module),
  78. !     same_file(File, LoadedFile), !,
  79. !     $assert_module_file(LoadedFile, Module).
  80.   
  81.   $assert_module_file(File, Module) :-
  82. !     $file_base_name(File, Base),
  83. !     (   $module_file(File, Base, Module)
  84. !     ->  true
  85. !     ;   asserta($module_file(File, Base, Module))
  86. !     ).
  87.   
  88.   $load_module(Module, Public, Import, File) :-
  89.       $set_source_module(OldModule, OldModule),
  90. --- 676,688 ----
  91.           $consult_clause(Clause, File), !.
  92.   
  93.   :- dynamic
  94. !     $module_file/2.
  95.   
  96.   $assert_module_file(File, Module) :-
  97. !     $module_file(File, Module), !.
  98. ! $assert_module_file(File, Module) :-
  99. !     asserta($module_file(File, Module)).
  100.   
  101.   $load_module(Module, Public, Import, File) :-
  102.       $set_source_module(OldModule, OldModule),
  103. diff -c -r +new-file pl/boot/syspred.pl pl/boot/syspred.pl
  104. *** pl/boot/syspred.pl    Thu Jul 22 17:45:13 1993
  105. --- pl/boot/syspred.pl    Fri Sep 17 10:07:53 1993
  106. ***************
  107. *** 1,4 ****
  108. ! /*  syspred.pl,v 1.5 1993/07/22 15:45:13 jan Exp
  109.   
  110.       Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  111.       jan@swi.psy.uva.nl
  112. --- 1,4 ----
  113. ! /*  syspred.pl,v 1.6 1993/09/17 08:07:53 jan Exp
  114.   
  115.       Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  116.       jan@swi.psy.uva.nl
  117. ***************
  118. *** 288,295 ****
  119.       $time_source_file(File, _).
  120.   source_file(File) :-
  121.       atom(File),
  122. !     $time_source_file(LoadedFile, _),
  123. !     same_file(LoadedFile, File), !.
  124.   
  125.           /********************************
  126.           *           DATA BASE           *
  127. --- 288,296 ----
  128.       $time_source_file(File, _).
  129.   source_file(File) :-
  130.       atom(File),
  131. !     absolute_file_name(File, Abs),    % canonise
  132. !     $time_source_file(Abs, _).
  133.   
  134.           /********************************
  135.           *           DATA BASE           *
  136. diff -c -r +new-file pl/src/md-linux.h pl/src/md-linux.h
  137. *** pl/src/md-linux.h    Fri Jul 23 12:29:36 1993
  138. --- pl/src/md-linux.h    Fri Sep 17 10:08:27 1993
  139. ***************
  140. *** 1,4 ****
  141. ! /*  md-linux.h,v 1.16 1993/07/23 10:29:36 jan Exp
  142.   
  143.       Copyright (c) 1992 Jan Wielemaker/Pieter Olivier. All rights reserved.
  144.       See ../LICENCE to find out about your rights.
  145. --- 1,4 ----
  146. ! /*  md-linux.h,v 1.17 1993/09/17 08:08:27 jan Exp
  147.   
  148.       Copyright (c) 1992 Jan Wielemaker/Pieter Olivier. All rights reserved.
  149.       See ../LICENCE to find out about your rights.
  150. ***************
  151. *** 60,65 ****
  152. --- 60,67 ----
  153.   #define O_NO_SEGV_ADDRESS    1
  154.   #define MAX_VIRTUAL_ADDRESS     (220*1024*1024) /* not sure, but it will do */
  155.   #define O_FOREIGN        1
  156. + #define LD_COMMAND        "gcc"
  157. + #define LD_OPT_OPTIONS        "-r -static"
  158.   #define LD_OPT_ADDR        "-T 0x%x"
  159.   #define O_SAVE            1
  160.   #define DATA_START        ((long) &etext + sizeof(long))
  161. diff -c -r +new-file pl/src/md-sun4.h pl/src/md-sun4.h
  162. *** pl/src/md-sun4.h    Mon Sep 13 11:52:35 1993
  163. --- pl/src/md-sun4.h    Fri Sep 17 10:08:28 1993
  164. ***************
  165. *** 1,4 ****
  166. ! /*  md-sun4.h,v 1.17 1993/09/13 09:52:35 jan Exp
  167.   
  168.       Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  169.       See ../LICENCE to find out about your rights.
  170. --- 1,4 ----
  171. ! /*  md-sun4.h,v 1.18 1993/09/17 08:08:28 jan Exp
  172.   
  173.       Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  174.       See ../LICENCE to find out about your rights.
  175. ***************
  176. *** 52,58 ****
  177.   #define O_NO_SEGV_ADDRESS    0
  178.   #define MAX_VIRTUAL_ADDRESS    (512 * 1024 *1024)
  179.   #define O_FOREIGN        1
  180. ! #define O_NOENTRY        1    /* ld -e doesn't work */
  181.   #define O_SAVE            1
  182.   #define DEFAULT_PATH        ":.:/usr/ucb:/bin:/usr/bin:";
  183.   #define SRANDOM(t)        srandom((long)t)
  184. --- 52,62 ----
  185.   #define O_NO_SEGV_ADDRESS    0
  186.   #define MAX_VIRTUAL_ADDRESS    (512 * 1024 *1024)
  187.   #define O_FOREIGN        1
  188. ! #ifndef USE_CC                /* just the default ld for cc */
  189. ! #define LD_COMMAND        "gcc"
  190. ! #endif
  191. ! #define LD_OPT_ADDR        "-T %x"
  192. ! #define O_NOENTRY        0    /* ld -e doesn't work */
  193.   #define O_SAVE            1
  194.   #define DEFAULT_PATH        ":.:/usr/ucb:/bin:/usr/bin:";
  195.   #define SRANDOM(t)        srandom((long)t)
  196. diff -c -r +new-file pl/src/pl-itf.h pl/src/pl-itf.h
  197. *** pl/src/pl-itf.h    Mon Sep  6 17:41:06 1993
  198. --- pl/src/pl-itf.h    Fri Sep 17 10:08:28 1993
  199. ***************
  200. *** 1,4 ****
  201. ! /*  pl-itf.h,v 1.30 1993/09/06 15:41:06 jan Exp
  202.   
  203.       Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  204.       See ../LICENCE to find out about your rights.
  205. --- 1,4 ----
  206. ! /*  pl-itf.h,v 1.31 1993/09/17 08:08:28 jan Exp
  207.   
  208.       Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  209.       See ../LICENCE to find out about your rights.
  210. ***************
  211. *** 11,17 ****
  212.   #define PL_INCLUDED
  213.   
  214.   #ifndef PLVERSION
  215. ! #define PLVERSION "1.8.0 September 1993"
  216.   #endif
  217.   
  218.   #ifndef P
  219. --- 11,17 ----
  220.   #define PL_INCLUDED
  221.   
  222.   #ifndef PLVERSION
  223. ! #define PLVERSION "1.8.1 September 1993"
  224.   #endif
  225.   
  226.   #ifndef P
  227. diff -c -r +new-file pl/src/pl-load.c pl/src/pl-load.c
  228. *** pl/src/pl-load.c    Thu Jun 17 11:45:16 1993
  229. --- pl/src/pl-load.c    Fri Sep 17 10:08:29 1993
  230. ***************
  231. *** 1,4 ****
  232. ! /*  pl-load.c,v 1.14 1993/06/17 09:45:16 jan Exp
  233.   
  234.       Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  235.       See ../LICENCE to find out about your rights.
  236. --- 1,4 ----
  237. ! /*  pl-load.c,v 1.15 1993/09/17 08:08:29 jan Exp
  238.   
  239.       Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  240.       See ../LICENCE to find out about your rights.
  241. ***************
  242. *** 249,256 ****
  243.   Create an a.out file from a .o file.
  244.   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  245.   
  246. ! #ifndef LD
  247. ! #define LD        "ld"        /* Unix loader command name */
  248.   #endif
  249.   #ifndef LD_OPT_OPTIONS
  250.   #define LD_OPT_OPTIONS    "-N"        /* General options */
  251. --- 249,256 ----
  252.   Create an a.out file from a .o file.
  253.   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  254.   
  255. ! #ifndef LD_COMMAND
  256. ! #define LD_COMMAND    "ld"        /* Unix loader command name */
  257.   #endif
  258.   #ifndef LD_OPT_OPTIONS
  259.   #define LD_OPT_OPTIONS    "-N"        /* General options */
  260. ***************
  261. *** 271,278 ****
  262.   #define LD_OPT_LIBS    "-lc"        /* standard libraries */
  263.   #endif
  264.   
  265. ! static
  266. ! bool
  267.   create_a_out(files, entry, options, libraries, base, outfile)
  268.   char *entry;
  269.   char *files;
  270. --- 271,277 ----
  271.   #define LD_OPT_LIBS    "-lc"        /* standard libraries */
  272.   #endif
  273.   
  274. ! static bool
  275.   create_a_out(files, entry, options, libraries, base, outfile)
  276.   char *entry;
  277.   char *files;
  278. ***************
  279. *** 285,292 ****
  280.   
  281.   #define next(str) { (str) += strlen(str); *(str)++ = ' '; };
  282.   
  283. !   sprintf(s, "%s ", LD);                     next(s);
  284. !   sprintf(s, "%s ", LD_OPT_OPTIONS);                 next(s);
  285.     sprintf(s, LD_OPT_SFILE, stringAtom(loaderstatus.symbolfile)); next(s);
  286.     sprintf(s, LD_OPT_ADDR, base);                 next(s);
  287.   #if !O_NOENTRY
  288. --- 284,291 ----
  289.   
  290.   #define next(str) { (str) += strlen(str); *(str)++ = ' '; };
  291.   
  292. !   sprintf(s, "%s", LD_COMMAND);                     next(s);
  293. !   sprintf(s, "%s", LD_OPT_OPTIONS);                 next(s);
  294.     sprintf(s, LD_OPT_SFILE, stringAtom(loaderstatus.symbolfile)); next(s);
  295.     sprintf(s, LD_OPT_ADDR, base);                 next(s);
  296.   #if !O_NOENTRY
  297. diff -c -r +new-file pl/src/pl-os.c pl/src/pl-os.c
  298. *** pl/src/pl-os.c    Mon Sep 13 11:52:39 1993
  299. --- pl/src/pl-os.c    Fri Sep 17 10:08:30 1993
  300. ***************
  301. *** 960,968 ****
  302.   forwards char   *canoniseDir P((char *));
  303.   #endif
  304.   
  305. ! static  char    CWDdir[MAXPATHLEN];       /* current directory */
  306.   
  307.   static void
  308.   initExpand()
  309.   { 
  310. --- 960,968 ----
  311.   forwards char   *canoniseDir P((char *));
  312.   #endif
  313.   
  314. ! static  char    CWDdir[MAXPATHLEN];    /* current directory */
  315. ! static  int     CWDlen;            /* Length of CWDdir */
  316.   
  317.   static void
  318.   initExpand()
  319.   { 
  320. ***************
  321. *** 972,977 ****
  322. --- 972,978 ----
  323.   #endif
  324.   
  325.     CWDdir[0] = EOS;
  326. +   CWDlen = 0;
  327.   
  328.   #if unix
  329.     if ( (cpaths = getenv("CANONICAL_PATHS")) )
  330. ***************
  331. *** 1353,1358 ****
  332. --- 1354,1360 ----
  333.   
  334.       return canonisePath(path);
  335.     }
  336.   #if OS2 && EMX
  337.     if (isDriveRelativePath(file))
  338.     {
  339. ***************
  340. *** 1368,1376 ****
  341.       return canonisePath(path);
  342.     }
  343.   #endif /* OS2 */
  344. !   if ( CWDdir[0] == EOS )
  345. !   {
  346. !     getwd(CWDdir);
  347.     }
  348.   
  349.   #if OS2 && EMX
  350. --- 1370,1384 ----
  351.       return canonisePath(path);
  352.     }
  353.   #endif /* OS2 */
  354. !   if ( CWDlen == 0 )
  355. !   { char buf[MAXPATHLEN];
  356. !     getwd(buf);
  357. !     strcpy(CWDdir, canonisePath(buf));
  358. !     CWDlen = strlen(CWDdir);
  359. !     CWDdir[CWDlen++] = '/';
  360. !     CWDdir[CWDlen] = EOS;
  361.     }
  362.   
  363.   #if OS2 && EMX
  364. ***************
  365. *** 1387,1402 ****
  366.       return canonisePath(path);
  367.     }
  368.   #endif /* OS2 */
  369. !   if ( (strlen(CWDdir) + strlen(file) + 2) >= MAXPATHLEN )
  370.     { warning("path name too long");
  371.       return (char *) NULL;
  372.     }
  373.     
  374.     strcpy(path, CWDdir);
  375. !   strcat(path, "/");
  376. !   strcat(path, file);
  377. !   return canonisePath(path);
  378.   }
  379.   
  380.   
  381. --- 1395,1411 ----
  382.       return canonisePath(path);
  383.     }
  384.   #endif /* OS2 */
  385. !   if ( (CWDlen + strlen(file) + 1) >= MAXPATHLEN )
  386.     { warning("path name too long");
  387.       return (char *) NULL;
  388.     }
  389.     
  390.     strcpy(path, CWDdir);
  391. !   strcpy(&path[CWDlen], file);
  392. !   if ( strchr(file, '.') || strchr(file, '/') )
  393. !     return canonisePath(path);
  394. !   else
  395. !     return path;
  396.   }
  397.   
  398.   
  399. ***************
  400. *** 1420,1426 ****
  401.   
  402.     for(base = p = f; *p; p++)
  403.       if (*p == '/' && p[1] != EOS )
  404. !       base = p;
  405.     strncpy(dir, f, base-f);
  406.     dir[base-f] = EOS;
  407.     
  408. --- 1429,1435 ----
  409.   
  410.     for(base = p = f; *p; p++)
  411.       if (*p == '/' && p[1] != EOS )
  412. !       base = p+1;
  413.     strncpy(dir, f, base-f);
  414.     dir[base-f] = EOS;
  415.     
  416. ***************
  417. *** 1440,1453 ****
  418.   char *path;
  419.   { extern int chdir(/*char**/);
  420.     char *ospath = OsPath(path);
  421.   
  422. !   if ( ospath[0] == EOS ||
  423. !        streq(ospath, CWDdir) ||
  424. !        streq(ospath, ".") )        /* Same directory */
  425.       succeed;
  426.   
  427.     if ( chdir(ospath) == 0 )
  428. !   { CWDdir[0] = EOS;
  429.       succeed;
  430.     }
  431.   
  432. --- 1449,1468 ----
  433.   char *path;
  434.   { extern int chdir(/*char**/);
  435.     char *ospath = OsPath(path);
  436. +   char buf[MAXPATHLEN];
  437.   
  438. !   if ( path[0] == EOS ||
  439. !        streq(path, CWDdir) ||
  440. !        streq(path, ".") )        /* Same directory */
  441.       succeed;
  442.   
  443. +   strcpy(buf, AbsoluteFile(path));
  444.     if ( chdir(ospath) == 0 )
  445. !   { strcpy(CWDdir, buf);
  446. !     CWDlen = strlen(CWDdir);
  447. !     CWDdir[CWDlen++] = '/';
  448. !     CWDdir[CWDlen] = EOS;
  449.       succeed;
  450.     }
  451.   
  452.